package com.mzj.saas.mservice.currency.controller;



import com.mzj.saas.mservice.currency.service.LockCurrencyService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 智能锁通用接口
 */
@Controller
@RequestMapping("/LockCurrency")
public class LockCurrencyController {
    private static final Logger log = LoggerFactory.getLogger(LockCurrencyController.class);
    @Autowired
    private LockCurrencyService lockCurrencyService;


    /**
     * 验证智能锁，或者 密码， 指纹 身份证 CPU卡  蓝牙 是否冻结
     * @param lockId
     * @param lockAuthId
     * @return
     */
    @GetMapping("/freezeOrNot")
    @ResponseBody
    public Boolean freezeOrNot(@RequestHeader String accessToken,
                               @RequestParam(value = "lockId", required = true) Long lockId,
                               @RequestParam(value = "lockAuthId", required = true) Long lockAuthId
                                                                ) {
        log.info("freezeOrNot , lockId={}, lockAuthId={},type={} ",lockId,lockAuthId);
        return lockCurrencyService.freezeOrNot(lockId,lockAuthId);
    }


}
